/**
 * Copyright (C)  2011  chen wei hua.
 * Permission is granted to copy, distribute and/or modify this document
 * under the terms of the GNU Free Documentation License, Version 2.0
 * or any later version published by the Free Software Foundation;
 * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 * A copy of the license is included in the section entitled "GNU Free Documentation License".
 */
package com.javaeye.store.service;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.javaeye.store.dao.MaterialsFieldDAO;
import com.javaeye.store.dto.MaterialsField;

public class MaterialsFieldService implements IMaterialsFieldService {
	
	private static Log log = LogFactory.getLog(MaterialsFieldService.class);
	
	private MaterialsFieldDAO dao;
	
	public void setDao(MaterialsFieldDAO dao) {
		this.dao = dao;
	}

	public List<MaterialsField> getFields(String fieldGroupId) {
		List<MaterialsField> results = dao.getFields(fieldGroupId);
		if (results == null || results.size() == 0) {
			log.warn("在数据库中未找到属性信息, 属性组=" + fieldGroupId);
		}
		return results;
	}
	
}
